﻿using Core.Domain.Entities;
using Core.Migrations.Extensions;
using FluentMigrator;

namespace Infrastructure.Persistence.Migrations.Permissions;

[Migration(202511042245)]
public class AddSourcePermissionIdColumn : ForwardOnlyMigration
{
    public override void Up()
    {
        Alter.Table(typeof(Permission).GetTableName())
          .InSchema(SchemaNames.Identity)
          .AddColumn(MigrationExpressions.ColumnNameFor<Permission>(nameof(Permission.SourcePermissionId)))
          .AsGuid().Nullable()
          .WithColumnDescription("溯源权限ID");
    }
}
